package com.cbs.management.mapper;
import java.io.Serializable;
import com.cbs.management.model.*;
import com.cbs.management.dto.*;
public class StaffMapper  implements Serializable {
    public Staff dtoToPersistence(StaffDTO dto){
        if(dto == null){
           return null;
        }
        Staff ret = new Staff();
        ret.setStaffId(dto.getStaffId());
        ret.setFamilyName(dto.getFamilyName());
        ret.setMiddleName(dto.getMiddleName());
        ret.setFirstName(dto.getFirstName());
        ret.setGender(dto.getGender());
        ret.setBirthDay(dto.getBirthDay());
        ret.setPositionId(dto.getPositionId());
        ret.setSiteId(dto.getSiteId());
        ret.setImageLink(dto.getImageLink());
        ret.setMarriageStatus(dto.getMarriageStatus());
        ret.setStartDate(dto.getStartDate());
        return ret;
    }
    public StaffDTO persistentToDto(Staff model){
        if(model == null){
           return null;
        }
        StaffDTO ret = new StaffDTO();
        ret.setStaffId(model.getStaffId());
        ret.setFamilyName(model.getFamilyName());
        ret.setMiddleName(model.getMiddleName());
        ret.setFirstName(model.getFirstName());
        ret.setGender(model.getGender());
        ret.setBirthDay(model.getBirthDay());
        ret.setPositionId(model.getPositionId());
        ret.setSiteId(model.getSiteId());
        ret.setImageLink(model.getImageLink());
        ret.setMarriageStatus(model.getMarriageStatus());
        ret.setStartDate(model.getStartDate());
        return ret;
    }
    public StaffMapper (){}
    
}    